<?php
/**
 *
 * Projet Authentic CMS
 * @file 	   request.php
 *
 * PHP version 5
 *
 *
 * @author     Poly Charly <CharlyPoly@gmail.fr>
 * @copyright  2009 Authentic Development Group
 * @license    GNU General Public License v3
 * @since      File available since Version 0.1.0
 * 
 */

class request {
	
	public $Get	 	= null;
	public $Post   	= null;
	public $Server 	= null;
	
	
	public function __construct() {
		$this->getRequests();
	}
	
	private function getRequests()
    {
        if (!get_magic_quotes_gpc()) {
            $this->Get = $_GET;
            $this->Post = $_POST;
            $this->Server = $_SERVER;
        } else {
            $this->Get = $this->stripslashesRecursive($_GET);
            $this->Post = $this->stripslashesRecursive($_POST);
            $this->Server = $this->stripslashesRecursive($_SERVER);
        }
    }
	
	public function get($id) {
		/*$argsarr	= array_values($args);
		foreach ($argsarr as $k=>$v) {
			
			if ($v == 1) {
				echo "<h2>S.lipkno.t' Profile ! </h2>";
			}
		
		}	*/
		
	}


    private function stripslashesRecursive($arr) {

        $return = array();
        if (is_array($arr)) {
            foreach ($arr as $key => $val)
            {
                if( is_array($val) )
                {
                    $return[$key] = $this->stripslashesRecursive($val);
                }
                else
                {
                    $return[$key] = stripslashes($val);
                }
            }
        } else {
            $return = stripslashes($arr);
        }
        return $return;

    }
}

?>